
#ifndef FRAGMENTUNIT_H_
#define FRAGMENTUNIT_H_

#include <omnetpp.h>
#include "NetworkPacket.h"
#include "Globals.h"
class FragmentUnit : public cSimpleModule
{
private:
	int m_FragmentSize;
	void FragmentAndSend(NetworkPacket* packet);
	void updateLastFragment(NetworkPacket* fragment, NetworkPacket* orig_packet);
protected:
	virtual void initialize();
	virtual void handleMessage(cMessage *msg);
};

#endif /* FRAGMENTUNIT_H_ */
